home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5063 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. Path: news.uni-jena.de!news
  2. From: mkt@isun04.inf.uni-jena.de (Tilo Koerbs)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: About inline function
  5. Date: 2 Feb 1996 11:18:06 GMT
  6. Organization: Lehrstuhl fuer Rechnerarchitektur- und kommunikation, FSU Jena
  7. Message-ID: <4esrte$80l@fsuj01.rz.uni-jena.de>
  8. References: <4dnvnl$o0s@mis.cpc.ku.ac.th>
  9. Reply-To: mkt@isun04.inf.uni-jena.de
  10. NNTP-Posting-Host: isun07.inf.uni-jena.de
  11.  
  12. Borland C++ will only expand functions inline if it is worth doing it.
  13. Since 'larger' inline fuctions can pump up code size dramatically,
  14. it is not usefull do expand it inline. And since a function call overhead
  15. on i80x86 is not a very big thing, the compiler restricts inlining.
  16.  
  17. The problem is: What is the right restriction criteria?
  18. Borland didn't used a good one.
  19. In practice, neither the user nor the compiler are able to find out
  20. exactly which functions to expand inline.
  21. The user: - don't know the costs of function calls
  22.     - don't know the run time of the code
  23.     - don't know the additional optimizations taken by
  24.         the compiler when inlining a function
  25. The compiler: - don't know how often the function is called
  26.     - don't know how much 'space for time' the user wants to give
  27.  
  28. Bye.
  29. Tilo Koerbs
  30.  
  31.  
  32.  
  33.